package fr.curriculumvitae.anthony.stephan.slidingdrawer;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

@SuppressWarnings("deprecation")
public class SlidingDrawer extends android.widget.SlidingDrawer {
	
	private boolean mLocked;
	
	public SlidingDrawer(Context context, AttributeSet attrs) {
		super(context, attrs);
	}
	
	@Override
    public void lock() {
		super.lock();
        mLocked = true;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (mLocked) {
            return false;
        } else {
        	return super.onTouchEvent(event);
        }
    }
	
}
